package com.esgpro.esg_api.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
@TableName("data_content")
@ApiModel("数据内容类")
public class DataContent {
    @ApiModelProperty("索引")
    private Integer id;
    @ApiModelProperty("标题")
    private String title;
    @ApiModelProperty("公司索引")
    private int comp_id;
    @ApiModelProperty("公司")
    @TableField(exist = false)
    private Company company;
    @ApiModelProperty("链接")
    private String url;
    @ApiModelProperty("评分")
    private int point;
    @ApiModelProperty("分类索引")
    private int type_id;
    @ApiModelProperty("类别")
    @TableField(exist = false)
    private DataType type;


    public DataContent(Integer id, String title, int comp_id, String url, int point, int type_id) {
        this.id = id;
        this.title = title;
        this.comp_id = comp_id;
        this.url = url;
        this.point = point;
        this.type_id = type_id;
    }

    public DataContent(Integer id, String title, Company company, String url, int point, DataType type) {
        this.id = id;
        this.title = title;
        this.company = company;
        this.url = url;
        this.point = point;
        this.type = type;
    }
}
